package com.student.util;

/**
 * Created by zhudong on 2016/9/17.
 */
public abstract class GenericsType<T> {
    Class<T> type;

    public GenericsType(){
        this.type = ReflectUtil.getClassGenricType(getClass());
    }

    public Class<T> getType() {
        return type;
    }

    //    public static void main(String[] args) {
//
//        Foo<String> foo = new Foo<String>(){};
//        Class mySuperClass = foo.getClass();
//
//    }

    public static void main(String[] args) {
        GenericsType<Integer> i = new GenericsType<Integer>() {};
        System.out.println(i.type);
    }
}
